//*****************************************************************************
//  C++: HW5
//  Shragay Dror (ID:038778445)
//  Zilber Jenia (ID:313975492)
//*****************************************************************************

#include "TC.h"

#include <iostream>
#include <string>
#include "PhoneOwner.h"

 
int main() { 
	TC* ps1 = TC::createObj(); 
	TC* ps2 = TC::createObj(); 

	int i;
	PhoneOwner*  PhoneOwners[5];
	PhoneOwners[0] = new PhoneOwner(ps1, "Mobile",  "+972526333444", 0.35);
	PhoneOwners[1] = new PhoneOwner(ps1, "Stationary", "+97239183101", 0.15);
	PhoneOwners[2] = new PhoneOwner(ps1, "Mobile", "+972549183101", 0.35);
	PhoneOwners[3] = new PhoneOwner(ps1, "Mobile", "+972549183102", 0.30);
	PhoneOwners[4] = new PhoneOwner(ps1, "Stationary", "+97249590783", 0.10);
	for ( i=0; i < 5; i++)
		PhoneOwners[i]->printOut();

	ps1->ChangeCost(0.5, 0.2);
	ps1->mobileUpgrade();

	for ( i=0; i < 5; i++)
		delete PhoneOwners[i];

	TC::Destroy();	// was created by static mem-function, so have to be destroyed in similar way
} 



